package com.zmn.oms.services.interfaces.acceptance;

import com.zmn.oms.model.dto.acceptance.OrderWorkAcceptanceDTO;
import com.zmn.oms.model.entity.acceptance.OrderWorkAcceptance;
import com.zmn.oms.model.entity.acceptance.OrderWorkAcceptanceDbQuery;

import java.util.List;

/**
 * 类描述：验收业务接口
 *
 * @author wangxiaokun
 * @since 2021/09/18 14:21
 */
public interface OrderWorkAcceptanceService {

    /**
     * 根据订单id集合查询验收列表
     *
     * @param orderIdList
     * @return
     */
    List<OrderWorkAcceptance> listOrderWorkAcceptanceByOrderIdList(List<Long> orderIdList);

    /**
     * 根据查询条件查询订单验收数量
     * @param orderWorkAcceptanceDbQuery
     * @return
     */
    int countOrderWorkAcceptanceByQuery(OrderWorkAcceptanceDbQuery orderWorkAcceptanceDbQuery);

    /**
     * 查询单个订单验收
     * @param acceptanceId
     * @return
     */
    OrderWorkAcceptance findOrderWorkAcceptanceByKey(Long acceptanceId, Long orderId);

    /**
     * 查询单个订单验收
     * @param acceptanceId
     * @return
     */
    OrderWorkAcceptance findOrderWorkAcceptanceByKeySrcMaster(Long acceptanceId, Long orderId);

    /**
     * 查询单个订单验收
     * @param query
     * @return
     */
    OrderWorkAcceptance findOrderWorkAcceptanceByQuerySrcMaster(OrderWorkAcceptanceDbQuery query);

    /**
     * 根据查询条件查询多个订单验收
     * @param query
     * @return
     */
    List<OrderWorkAcceptance> listOrderWorkAcceptanceByQuery(OrderWorkAcceptanceDbQuery query);

    /**
     * 根据查询条件查询多个订单验收（查主库）
     * @param query
     * @return
     */
    List<OrderWorkAcceptance> listOrderWorkAcceptanceByQuerySrcMaster(OrderWorkAcceptanceDbQuery query);

    /**
     * 修改订单验收
     * @param dto
     */
    void updateOrderWorkAcceptanceByKey(OrderWorkAcceptanceDTO dto);

    /**
     * 更新所有确认类型验收
     * @param dto
     */
    void updateOrderWorkConfirmAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 发起验收
     * @param dto
     */
    void insertOrderWorkAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 发起定金确认
     * @param dto
     */
    void insertOrderWorkDepositAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 定金确认
     * @param dto
     */
    void depositConfirmAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 工程师代确认
     * @param dto
     */
    void engineerConfirmAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 工程师代验收
     * @param dto
     */
    void engineerAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 取消定金确认
     * @param dto
     */
    void cancelDepositAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 取消验收
     * @param dto
     */
    void cancelAcceptance(OrderWorkAcceptanceDTO dto);

    /**
     * 清空服务验收
     * @param orderId
     */
    void deleteAcceptanceByOrderId(Long orderId);

    /**
     * 根据主键删除验收
     * @param orderId
     * @param acceptanceId
     */
    void deleteAcceptanceBykey(Long orderId, Long acceptanceId);
}
